package com.blue.firecat.exception;

import com.blue.firecat.enums.ErrorEnum;

/**
 * 描述 异常处理
 * 时间 2017-6-23 10:18
 * 作者 肖亦鸣
 */
public class ServiceException extends RuntimeException {
    private int code;

    public ServiceException(ErrorEnum errorEnum) {
        super(ErrorEnum.getValueByCode(errorEnum.getCode()));

    }

    public ServiceException(String message) {
        super(message);
        this.code = code;
    }

    public ServiceException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
